//
//  LCBaseViewController.m
//  LendCash
//
//  Created by Mac mini on 2018/5/23.
//  Copyright © 2018年 zt. All rights reserved.
//

#import "LCBaseViewController.h"

@interface LCBaseViewController ()

@end

@implementation LCBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}


-(void)initNavLeftWithImage:(NSString *)imageName{
    
    UIBarButtonItem *item = [self createNavItemWithImage:imageName];
    [item setTag:leftItemClick];
    self.navigationItem.leftBarButtonItem = item;
}

-(void)initNavRightWithImage:(NSString *)imageName{
    UIBarButtonItem *item = [self createNavItemWithImage:imageName];
    [item setTag:rightItemClick];
    self.navigationItem.rightBarButtonItem = item;
}

-(UIBarButtonItem *)createNavItemWithImage:(NSString *)image{
    UIBarButtonItem *item = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:image] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(itemClick:)];
    return item;
}

-(void)itemClick:(UIBarButtonItem *)item{
    NSLog(@"click");
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
